package com.yonyou.pmclouds.team.entity;

import com.yonyou.pmclouds.basecom.entity.SuperVO;
import lombok.Data;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

@Data
@Table(name = "pmbd_team_ent")
public class TeamEnterpriseVO extends SuperVO {
    public static final String PK_TEAM_ENT = "pkTeamEnt";
    public static final String PK_ENTERPRISE = "pkEnterprise";
    public static final String ENT_ROLE = "entRole";
    public static final String ENTERPRISE_NAME = "enterpriseName";
    public static final String PK_PROJECT = "pkProject";

    @Id
    private String pkTeamEnt;
    private String pkTenant;
    private String pkProject;
    /**
     * 参与企业
     */
    private String pkEnterprise;
    /**
     * 企业名称
     */
    @Transient
    private String enterpriseName;
    /**
     * 企业角色
     */
    private Byte entRole;
    private String creator;
    private Date creationtime;
    private String modifier;
    private Date modifytime;

    /**
     * 企业角色常量
     */
    public interface EnterpriseRoleConst {
        /**
         * 业主方、甲方
         */
        byte ROLE_OWNER = 10;
        /**
         * 施工方、乙方
         */
        byte ROLE_CONSTRUCTOR = 20;
        /**
         * 监理方
         */
        byte ROLE_SUPERVISOR = 30;
    }
}
